home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / awe2-0_1.lha / awe2-0.1 / Src / RCS / Statistic.h,v < prev    next >
Text File  |  1989-05-04  |  2KB  |  173 lines

  1. head     3.3;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    grunwald:3.3; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 3.3
  10. date     89.05.04.14.38.08;  author grunwald;  state Exp;
  11. branches ;
  12. next     3.2;
  13.  
  14. 3.2
  15. date     89.02.20.15.37.46;  author grunwald;  state Exp;
  16. branches ;
  17. next     3.1;
  18.  
  19. 3.1
  20. date     88.12.20.13.50.22;  author grunwald;  state Exp;
  21. branches ;
  22. next     1.2;
  23.  
  24. 1.2
  25. date     88.10.30.13.06.12;  author grunwald;  state Exp;
  26. branches ;
  27. next     1.1;
  28.  
  29. 1.1
  30. date     88.09.18.16.42.15;  author grunwald;  state Exp;
  31. branches ;
  32. next     ;
  33.  
  34.  
  35. desc
  36. @@
  37.  
  38.  
  39. 3.3
  40. log
  41. @Before switching to Gnu lib version
  42. @
  43. text
  44. @// This may look like C code, but it is really -*- C++ -*-
  45. // 
  46. // Copyright (C) 1988 University of Illinois, Urbana, Illinois
  47. //
  48. // written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
  49. //
  50. #ifndef STATISTICH
  51. #define STATISTICH
  52. #pragma once
  53.  
  54. #include <Awesime.h>
  55.  
  56. class Statistic : public Awesime {
  57. protected:
  58.     int    n;
  59.     double x;
  60.     double x2;
  61.     double minValue, maxValue;
  62.  
  63.     double tval(double, int);
  64.  
  65. public :
  66.  
  67.     inline Statistic(){ reset();}
  68.     virtual void reset(); 
  69.  
  70.     virtual void operator+=(double);
  71.     virtual int samples();
  72.     virtual double mean();
  73.     virtual double stdDev();
  74.     virtual double var();
  75.     virtual double min();
  76.     virtual double max();
  77.     virtual double sum();
  78.     virtual double confidence(int p_percentage);
  79.     virtual double confidence(double p_value);
  80.  
  81.     virtual void classPrintOn(ostream&);
  82. };
  83.  
  84. #endif STATISTICH
  85. @
  86.  
  87.  
  88. 3.2
  89. log
  90. @Start using Gnu library heaps for schedulers
  91. @
  92. text
  93. @d9 1
  94. d11 1
  95. a11 1
  96. #include "Awesime.h"
  97. d14 1
  98. d20 1
  99. a20 1
  100.     public :
  101. d22 2
  102. d28 9
  103. a36 8
  104.     int samples();
  105.     double mean();
  106.     double stdDev();
  107.     double var();
  108.     double min();
  109.     double max();
  110.     double sum();
  111.     double confidence(int);
  112. a37 1
  113. //    virtual const char *classIsA();
  114. a39 24
  115.  
  116. inline int
  117. Statistic::samples()
  118. {
  119.     return(n);
  120. }
  121.  
  122. inline double
  123. Statistic::min()
  124. {
  125.     return(minValue);
  126. }
  127.  
  128. inline double
  129. Statistic::max()
  130. {
  131.     return(maxValue);
  132. }
  133.  
  134. inline double
  135. Statistic::sum()
  136. {
  137.     return(x);
  138. }
  139. @
  140.  
  141.  
  142. 3.1
  143. log
  144. @Steay version
  145. @
  146. text
  147. @@
  148.  
  149.  
  150. 1.2
  151. log
  152. @*** empty log message ***
  153. @
  154. text
  155. @d24 1
  156. a24 1
  157.     inline int  samples() {return(n);}
  158. d28 3
  159. a30 2
  160.     inline double min() {return(minValue);}
  161.     inline double max() {return(maxValue);}
  162. d36 24
  163. @
  164.  
  165.  
  166. 1.1
  167. log
  168. @Initial revision
  169. @
  170. text
  171. @d1 6
  172. @
  173.